home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / fish / 001-100 / 001-025 / 020 / hd / poster < prev    next >
Text File  |  1995-03-17  |  2KB  |  57 lines

  1. Article 763 of net.sources:
  2. Relay-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site unisoft.UUCP
  3. Posting-Version: version B 2.10.3 5.1sysV68-beta 6/6/85; site necis.UUCP
  4. Path: unisoft!lll-lcc!vecpyr!amd!amdcad!decwrl!decvax!wanginst!vaxine!encore!necis!yde
  5. From: yde@necis.UUCP (David Elins ext. 220)
  6. Newsgroups: net.sources
  7. Subject: hd (hex dump, modelled on od)
  8. Message-ID: <281@necis.UUCP>
  9. Date: 8 Apr 86 23:05:50 GMT
  10. Date-Received: 12 Apr 86 16:18:13 GMT
  11. Reply-To: yde@necis.UUCP (David Elins ext. 220)
  12. Organization: NEC Information Systems
  13. Lines: 360
  14.  
  15.  
  16. I decided to post this after following the spirited discussion of
  17. the "byte order problem" in net.lang.c.
  18.  
  19. Everyone has their own favorite version of a hex dump utility. I wrote
  20. this one some time ago and recently modified based on some ideas
  21. stated by Mike Higgins in Computer Language magazine, April 1 1986.
  22.  
  23. The amended version format the dump based on the natural byte ordering
  24. of the machine on which it runs
  25.  
  26. for 'little-endian' machines such as the vax the format is
  27.  
  28. hex_longword hex_longword hex_longword hex_longword  offset_in_file |ascii|
  29. .
  30. .
  31. .
  32. with the addresses of hex_longwords increasing right to left (and top
  33. to bottom)
  34.  
  35. for 'big-endian' machines such as the M68000 the format is
  36.  
  37. offset_in_file  hex_longword hex_longword hex_longword hex_longword  |ascii|
  38. .
  39. .
  40. .
  41. with the addresses of hex_longwords increasing left to right
  42. in both cases, the |ascii| portion addresses increase left to right
  43.  
  44.  
  45. Usage:
  46. hd [-cx]
  47.  
  48. The -c option will print the ascii value of each byte above its hex
  49. representation, just like od does.
  50.  
  51. The -x option reverses the 'natural' byte order of the display.
  52.  
  53. I have used this program only on Unix system III, system V, and
  54. MS-DOS (Microsoft C, v3.0). I don't know if it will work on Berkeley.
  55.  
  56. ----------- cut here, if you please ---------
  57.